﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Toon.Controls
{
	public partial class AttributeControl : UserControl
	{
		public AttributeControl()
		{
			InitializeComponent();
		}

		public static readonly DependencyProperty DerivedProperty = DependencyProperty.Register("Derived", typeof(object), typeof(AttributeControl), new PropertyMetadata(null, OnDerivedChanged));

		private static void OnDerivedChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
		{
			AttributeControl attributeControl = o as AttributeControl;
			if (attributeControl != null)
				attributeControl.OnDerivedChanged((object)e.OldValue, (object)e.NewValue);
		}

		protected virtual void OnDerivedChanged(object oldValue, object newValue)
		{
			// TODO: Add your property changed side-effects. Descendants can override as well.
		}

		public object Derived
		{
			get { return (object)GetValue(DerivedProperty); }
			set { SetValue(DerivedProperty, value); }
		}
	}
}
